package org.CurrencyDAO.DTO;

import java.math.BigDecimal;
import java.util.Date;

public class CurrencyExchangeDTO {

	
	private Long id;
	private Date date;
	private Integer converter;
	private BigDecimal averageExchange;
	private CurrencyType currencyType;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public Integer getConverter() {
		return converter;
	}
	public void setConverter(Integer converter) {
		this.converter = converter;
	}
	public BigDecimal getAverageExchange() {
		return averageExchange;
	}
	public void setAverageExchange(BigDecimal averageExchange) {
		this.averageExchange = averageExchange;
	}
	public CurrencyType getCurrencyType() {
		return currencyType;
	}
	public void setCurrencyType(CurrencyType currencyType) {
		this.currencyType = currencyType;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((averageExchange == null) ? 0 : averageExchange.hashCode());
		result = prime * result + ((converter == null) ? 0 : converter.hashCode());
		result = prime * result + ((currencyType == null) ? 0 : currencyType.hashCode());
		result = prime * result + ((date == null) ? 0 : date.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CurrencyExchangeDTO other = (CurrencyExchangeDTO) obj;
		if (averageExchange == null) {
			if (other.averageExchange != null)
				return false;
		} else if (!averageExchange.equals(other.averageExchange))
			return false;
		if (converter == null) {
			if (other.converter != null)
				return false;
		} else if (!converter.equals(other.converter))
			return false;
		if (currencyType != other.currencyType)
			return false;
		if (date == null) {
			if (other.date != null)
				return false;
		} else if (!date.equals(other.date))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "CurrencyExchangeDTO [id=" + id + ", date=" + date + ", converter=" + converter + ", averageExchange=" + averageExchange
				+ ", currencyType=" + currencyType + "]";
	}
	 
	
	

}
